import React, { Component } from 'react'
import '../assets/css/k-logo.less'
import imgSrc from '../assets/images/logo.png'
import { Toast } from 'antd-mobile'
import { hashHistory } from 'react-router'
export default class Klogo extends Component {
  goToLogin = () => {
    Toast.show({ icon: 'loading', content: '加载中...', duration: 500 })
    setTimeout(() => {
      hashHistory.push('/login')
    }, 500)
  }
  render() {
    return (
      <div
        onClick={this.goToLogin}
        className="k-logo"
        style={{ height: this.props.height || '60px' }}
      >
        <img src={imgSrc} alt="" />
      </div>
    )
  }
}
